home *** CD-ROM | disk | FTP | other *** search
- /* This file contains some miscelaneous functions that wouldn't fit in other
- * files. So it is a mess ... Cthulu
- */
-
-
- #include <sys/times.h>
- #include <exec/tasks.h>
-
- char *malloc();
-
- /* change what options .... */
- int fcntl(int fd, int cmd, int arg) { return 0; }
-
-
- /* Networks use the same format as Motorola, so no byte-swapping needed.
- * For Intel this function should be implemented. *grin*
- */
- unsigned short htons(int integer) { return integer; }
-
-
- int getpid() {
- extern struct Task *FindTask(char *);
- return (int)FindTask(0L); /* anyone got a better suggestion ?? */
- }
-
- void times(t)
- register struct tms *t;
- {
- extern time_t time(time_t *_timer);
-
- t->tms_utime = 0; /* user-time */
- t->tms_stime = time(0); /* system-time */
- return;
- }
-
- /*
- * block zero
- */
-
- void
- bzero (b, length)
- register char *b;
- register int length;
- {
- #ifdef AZTEC_C
- setmem(b, length, '\0');
- #else
- memset(b,'\0',length);
- #endif
- }
-
- void srandom(unsigned int seed) {
- srand(seed);
- }
-
- void random() {
- rand();
- }
-